<?php
/**
 * @link https://www.kancloud.cn/cleverstone/ymb2
 * @copyright Copyright (c) 2020 Yii Manager Software LLC
 */

namespace builder\helper;

/**
 * 函数
 * @author cleverstone
 * @since ym2.0
 */
class Func
{
    /**
     * 是否是函数或闭包
     * @param string|object $mixed 变量
     * @return bool
     */
    public static function is($mixed)
    {
        return (is_string($mixed) && function_exists($mixed)) || (is_object($mixed) && ($mixed instanceof \Closure));
    }
}